home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 2618 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.0 KB

  1. Path: atglab.bls.com!Alun.Champion
  2. From: Alun.Champion@bridge.bst.bls.com (Alun Champion)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: What?? MS forgot about the ANSI standard
  5. Date: 18 Jan 1996 18:28:27 GMT
  6. Organization: Computer People Inc.
  7. Message-ID: <ALUN.CHAMPION.96Jan18132827@g7240065.bridge.bst.bls.com>
  8. References: <30FE840F.4235@email.usps.gov>
  9. NNTP-Posting-Host: bstfirewall.bst.bls.com
  10. In-reply-to: Craig Johnson's message of Thu, 18 Jan 1996 12:31:59 -0500
  11.  
  12. In article <30FE840F.4235@email.usps.gov> Craig Johnson <cjohnso7@email.usps.gov> writes:
  13.  
  14. : I am using the code similar to below in VC 4.0:
  15.  
  16. :       char block[80];
  17. :       int *p = new (block) int;
  18.  
  19. : I get the following compiler error:
  20.  
  21. : error C2661: 'new' : no overloaded function takes 2 parameters
  22.  
  23. : This is perfectly valid C++ syntax.  Am I crazy or did Microsoft 
  24. : forget about the ANSI standard.  Any of you using the STL 
  25. : probably came across this error also.  If so, how did you 
  26. : resolve it?
  27.  
  28. This is valid C++ syntax only if you include <new.h>.
  29.  
  30. Regards
  31.  
  32.    -A.
  33. -- 
  34. | A.Champion                |
  35.